//
//  ShareController.m
//  PosApp
//
//  Created by 刘萍 on 2018/9/12.
//  Copyright © 2018年 李英新. All rights reserved.
//

#import "ShareController.h"
#import "SharePosterController.h"
#import "ShareTextController.h"

@interface ShareController ()
@property (weak, nonatomic) IBOutlet UIButton *ShareBtn;


@end

@implementation ShareController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    self.navigationItem.title = @"分享推广";
    
    self.ShareBtn.layer.cornerRadius = self.ShareBtn.bounds.size.height/2;
    self.ShareBtn.layer.masksToBounds = YES;
    CAGradientLayer *gl = [CAGradientLayer layer];
    gl.frame = CGRectMake(0,0,self.ShareBtn.bounds.size.width,self.ShareBtn.bounds.size.height);
    gl.startPoint = CGPointMake(0, 0);
    gl.endPoint = CGPointMake(1, 1);
    gl.colors = @[(__bridge id)[UIColor colorWithRed:111/255.0 green:116/255.0 blue:255/255.0 alpha:1].CGColor,(__bridge id)[UIColor colorWithRed:154/255.0 green:135/255.0 blue:251/255.0 alpha:1].CGColor];
    gl.locations = @[@(0.0),@(1.0f)];
    
    [self.ShareBtn.layer addSublayer:gl];
    

    
    
}

- (IBAction)ClickOnBtnToShareWithCard:(id)sender {
    SharePosterController * PostC = [[SharePosterController alloc] init];
    [self.navigationController pushViewController:PostC animated:YES];
}
- (IBAction)ClickOnBtnToShareWithTextContent:(id)sender {
    ShareTextController * TextC = [[ShareTextController alloc] init];
    [self.navigationController pushViewController:TextC animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
